package net.es.weathermap.beans;

import java.util.HashMap;
import java.util.List;

public class Node extends TopologyBean {

    private HashMap<String, List<IfceConnection>> ifceConnectionsByType;
    private Double latitude;
    private Double longitude;
    private String type;
    private int lod;
    private String fullName;

    private HashMap<String, List<AggrConnection>> aggrConnectionsByType;

    public List<AggrConnection> getAggrConnections(String type) {
        if (this.aggrConnectionsByType == null) {
            this.aggrConnectionsByType = new HashMap<String, List<AggrConnection>>();
        }
        return aggrConnectionsByType.get(type);
    }

    public void setAggrConnections(String type, List<AggrConnection> aggrConnections) {
        if (this.aggrConnectionsByType == null) {
            this.aggrConnectionsByType = new HashMap<String, List<AggrConnection>>();
        }
        this.aggrConnectionsByType.put(type, aggrConnections);
    }
    
    
    public List<IfceConnection> getIfceConnections(String type) {
        if (this.ifceConnectionsByType == null) {
            this.ifceConnectionsByType = new HashMap<String, List<IfceConnection>>();
        }
        return ifceConnectionsByType.get(type);
    }

    public void setIfceConnections(String type, List<IfceConnection> ifceConnections) {
        if (this.ifceConnectionsByType == null) {
            this.ifceConnectionsByType = new HashMap<String, List<IfceConnection>>();
        }
        this.ifceConnectionsByType.put(type, ifceConnections);
    }

    public String getType() {
        return this.type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = Double.valueOf(longitude.trim());
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = Double.valueOf(latitude.trim());
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public void setLod(String lod) {
        this.lod = Integer.parseInt(lod.trim());
    }

    public void setLod(int lod) {
        this.lod = lod;
    }

    public int getLod() {
        return this.lod;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getFullName() {
        return this.fullName;
    }
}
